﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Store Manager/SM_panel.master" AutoEventWireup="true" CodeFile="SM_Product.aspx.cs" Inherits="Store_Manager_SM_Product" %>



<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxUploadControl" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>



<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>



<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    
        
          
    <script src="Scripts/jquery-1.3.2.js" type="text/javascript"></script>
    <script src="Scripts/jquery.MultiFile.js" type="text/javascript"></script>

  <script type="text/javascript">
    // <![CDATA[

      function showproduct() {
           ASPxPopupControl1.Show();
       }
      </script>
    
    <style type="text/css">
        .style3
        {
            width: 184px;
            font-family: Tahoma;
            font-size: small;
        }
        .style5
        {
            width: 326px;
        }
        .style6
        {
            width: 324px;
        }
        .style11
        {
            width: 34px;
        }
        .style12
        {
            width: 735px;
        }
        .style13
        {
            width: 245px;
        }
        .style14
        {
            width: 129px;
        }
        .style15
        {
            width: 258px;
        }
        .style24
        {
            font-family: Tahoma;
            font-size: small;
        }
        .style25
        {
            width: 258px;
            font-family: Tahoma;
            font-size: small;
        }
        .style26
        {
            font-size: small;
        }
        .style27
        {
            font-family: Tahoma;
        }
        .style46
        {
            width: 165px;
            height: 20px;
        }
        .style47
        {
            width: 165px;
        }
        </style>

  
    
  </asp:Content>
 
 <%--Content Start--%>    
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

        <%--panel content--%>  
        <table border="0" width="100%">
            <tr>
                <td  bgcolor="#F8F8F8" >
                    &nbsp;</td>
                <td  bgcolor="#F8F8F8"  >
                    &nbsp;</td>
                <td bgcolor="#F8F8F8" width="1045" >
                    &nbsp;</td>
            </tr>
            <tr>
                <td bgcolor="#F8F8F8" colspan="3" >
                    <table width="100%" >
                        <tr>
                            <td class="style11" >
                                &nbsp;</td>
                            <td class="style13"  >
                                <strong>
                    <asp:Label ID="Label5" runat="server" ForeColor="#0000CC" 
                        Text="Click this button to add new product" style="font-size: small" 
                                    CssClass="style27"></asp:Label>
                                </strong>
                            </td>
                            <td>
    <dx:ASPxButton ID="ASPxButton1" runat="server" ClientIDMode="AutoID"  
        CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css" CssPostfix="Office2003Olive" 
         SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css" 
        Text="Add Product" style="margin-left: 0px" CssClass="style26">
    
            <ClientSideEvents Click="function(s, e) { showproduct(); }" />
        </dx:ASPxButton>
     
        
                            </td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style11" >
                                &nbsp;</td>
                            <td class="style13"  >
                                &nbsp;</td>
                            <td>
                         <dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" CloseAction="CloseButton" Modal="True"
        PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ClientInstanceName="ASPxPopupControl1"
        HeaderText="Add New Product" AllowDragging="True" EnableAnimation="False" 
                     EnableViewState="False" Width="846px" ClientIDMode="AutoID" 
                     CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                     Height="300px" SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
       
                    <LoadingPanelImage Url="~/App_Themes/BlackGlass/Web/Loading.gif">
                    </LoadingPanelImage>
                    <ContentStyle HorizontalAlign="Left" VerticalAlign="Top">
                    </ContentStyle>
                    <HeaderStyle>
                    <Paddings PaddingBottom="6px" PaddingLeft="15px" PaddingRight="6px" 
                        PaddingTop="3px" />
<Paddings PaddingLeft="15px" PaddingTop="3px" PaddingRight="6px" PaddingBottom="6px"></Paddings>
                    </HeaderStyle>
                    <ContentCollection>
<dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True">
    <dx:ASPxPanel ID="ASPxPanel1" runat="server" ClientIDMode="AutoID" 
        Height="447px" Width="100%">
        <PanelCollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                &nbsp;<table width="100%">
                    <tr>
                        <td class="style5">
                            <strong></strong>
                        </td>
                        <td class="style3">
                            <strong>
                            <asp:Label ID="Label4" runat="server" CssClass="style24" Text="Category Name" 
                                Width="100px"></asp:Label>
                            </strong>
                        </td>
                        <td>
                            &nbsp;</td>
                        <td class="style14">
                            <strong>
                            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                                DataSourceID="SqlDataSource10" DataTextField="Cat_Name" 
                                DataValueField="Cat_ID">
                            </asp:DropDownList>
                            </strong>
                        </td>
                        <td class="style15">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style5">
                            &nbsp;</td>
                        <td class="style3">
                            <strong>Subcategory ID</strong></td>
                        <td>
                            &nbsp;</td>
                        <td class="style14">
                            <strong>
                            <asp:DropDownList ID="DropDownList2" runat="server" 
                                DataSourceID="SqlDataSource2" DataTextField="Sub_Cat_Name" 
                                DataValueField="Sub_Cat_Name">
                            </asp:DropDownList>
                            </strong>
                        </td>
                        <td class="style15">
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td class="style24" colspan="6">
                            <hr class="style12" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style5">
                            &nbsp;</td>
                        <td class="style3">
                            <strong>Item Code</strong></td>
                        <td>
                            &nbsp;</td>
                        <td class="style14">
                            <dx:ASPxTextBox ID="Productid" runat="server" BackColor="#D8E3B6" 
                                ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
                                CssPostfix="BlackGlass" ReadOnly="True" 
                                SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Width="150px">
                                <ValidationSettings>
                                    <ErrorFrameStyle ImageSpacing="4px">
                                        <ErrorTextPaddings PaddingLeft="4px" />
                                    </ErrorFrameStyle>
                                    <RequiredField ErrorText="Please fill this feild" IsRequired="True" />
                                </ValidationSettings>
                            </dx:ASPxTextBox>
                        </td>
                        <td class="style25">
                            <strong>Product Code</strong></td>
                        <td>
                            <dx:ASPxComboBox ID="ASPxComboBox1" runat="server" ClientIDMode="AutoID" 
                                CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                                OnInit="ASPxComboBox1_Init" 
                                SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" 
                                ValueType="System.String" Width="150px">
                                <Items>
                                    <dx:ListEditItem Text="1" Value="1" />
                                    <dx:ListEditItem Text="2" Value="2" />
                                    <dx:ListEditItem Text="3" Value="3" />
                                    <dx:ListEditItem Text="4" Value="4" />
                                    <dx:ListEditItem Text="5" Value="5" />
                                    <dx:ListEditItem Text="6" Value="6" />
                                    <dx:ListEditItem Text="7" Value="7" />
                                    <dx:ListEditItem Text="8" Value="8" />
                                    <dx:ListEditItem Text="9" Value="9" />
                                    <dx:ListEditItem Text="10" Value="10" />
                                    <dx:ListEditItem Text="11" Value="11" />
                                    <dx:ListEditItem Text="12" Value="12" />
                                    <dx:ListEditItem Text="13" Value="13" />
                                    <dx:ListEditItem Text="14" Value="14" />
                                    <dx:ListEditItem Text="15" Value="15" />
                                    <dx:ListEditItem Text="16" Value="16" />
                                    <dx:ListEditItem Text="17" Value="17" />
                                    <dx:ListEditItem Text="18" Value="18" />
                                    <dx:ListEditItem Text="19" Value="19" />
                                    <dx:ListEditItem Text="20" Value="20" />
                                    <dx:ListEditItem Text="21" Value="21" />
                                    <dx:ListEditItem Text="22" Value="22" />
                                    <dx:ListEditItem Text="23" Value="23" />
                                    <dx:ListEditItem Text="24" Value="24" />
                                    <dx:ListEditItem Text="25" Value="25" />
                                    <dx:ListEditItem Text="26" Value="26" />
                                    <dx:ListEditItem Text="27" Value="27" />
                                    <dx:ListEditItem Text="28" Value="28" />
                                    <dx:ListEditItem Text="29" Value="29" />
                                    <dx:ListEditItem Text="30" Value="30" />
                                    <dx:ListEditItem Text="31" Value="31" />
                                    <dx:ListEditItem Text="32" Value="32" />
                                    <dx:ListEditItem Text="33" Value="33" />
                                    <dx:ListEditItem Text="34" Value="34" />
                                    <dx:ListEditItem Text="35" Value="35" />
                                    <dx:ListEditItem Text="36" Value="36" />
                                    <dx:ListEditItem Text="37" Value="37" />
                                    <dx:ListEditItem Text="38" Value="38" />
                                    <dx:ListEditItem Text="39" Value="39" />
                                    <dx:ListEditItem Text="40" Value="40" />
                                    <dx:ListEditItem Text="41" Value="41" />
                                    <dx:ListEditItem Text="42" Value="42" />
                                    <dx:ListEditItem Text="43" Value="43" />
                                    <dx:ListEditItem Text="44" Value="44" />
                                    <dx:ListEditItem Text="45" Value="45" />
                                    <dx:ListEditItem Text="46" Value="46" />
                                    <dx:ListEditItem Text="47" Value="47" />
                                    <dx:ListEditItem Text="48" Value="48" />
                                    <dx:ListEditItem Text="49" Value="49" />
                                    <dx:ListEditItem Text="50" Value="50" />
                                </Items>
                                <LoadingPanelImage Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
                                </LoadingPanelImage>
                                <ButtonStyle Width="11px">
                                </ButtonStyle>
                                <ValidationSettings ErrorText="Error has occurred">
                                    <ErrorFrameStyle ImageSpacing="4px">
                                        <ErrorTextPaddings PaddingLeft="4px" />
                                    </ErrorFrameStyle>
                                </ValidationSettings>
                            </dx:ASPxComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style5">
                            &nbsp;</td>
                        <td class="style3">
                            <strong>Item&nbsp; Description</strong></td>
                        <td>
                            &nbsp;</td>
                        <td class="style14">
                            <dx:ASPxTextBox ID="productdescription" runat="server" ClientIDMode="AutoID" 
                                CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                                SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Width="150px">
                                <ValidationSettings>
                                    <ErrorFrameStyle ImageSpacing="4px">
                                        <ErrorTextPaddings PaddingLeft="4px" />
                                    </ErrorFrameStyle>
                                </ValidationSettings>
                            </dx:ASPxTextBox>
                        </td>
                        <td class="style25">
                            <strong>Item&nbsp; Name</strong></td>
                        <td>
                            <dx:ASPxTextBox ID="productname" runat="server" ClientIDMode="AutoID" 
                                CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                                SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Width="150px">
                                <ValidationSettings>
                                    <ErrorFrameStyle ImageSpacing="4px">
                                        <ErrorTextPaddings PaddingLeft="4px" />
                                    </ErrorFrameStyle>
                                    <RequiredField ErrorText="Please fill this field" IsRequired="True" />
                                </ValidationSettings>
                            </dx:ASPxTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style5">
                            &nbsp;</td>
                        <td class="style3">
                            <strong>Item Brand</strong></td>
                        <td>
                            &nbsp;</td>
                        <td class="style14">
                            <dx:ASPxTextBox ID="brand" runat="server" ClientIDMode="AutoID" Width="150px">
                            </dx:ASPxTextBox>
                        </td>
                        <td class="style25">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style5">
                            &nbsp;</td>
                        <td class="style3">
                            <strong><span class="style24">Purchase</span>&nbsp;<span class="style24">Price</span></strong></td>
                        <td>
                            &nbsp;</td>
                        <td class="style14">
                            <dx:ASPxTextBox ID="purchaseprice" runat="server" ClientIDMode="AutoID" 
                                DisplayFormatString="Rs.{0}" Width="150px">
                                <MaskSettings Mask="&lt;0..99999g&gt;.&lt;00..99&gt;" />
                                <ValidationSettings>
                                    <RegularExpression ErrorText="" />
                                    <RequiredField ErrorText="Please Fill this field" IsRequired="True" />
                                </ValidationSettings>
                            </dx:ASPxTextBox>
                        </td>
                        <td class="style25">
                            <strong>Retail Price </strong>
                        </td>
                        <td>
                            <dx:ASPxTextBox ID="retailprice" runat="server" AutoPostBack="True" 
                                ClientIDMode="AutoID" DisplayFormatString="Rs.{0}" 
                                OnTextChanged="retailprice_TextChanged" Width="150px">
                                <MaskSettings Mask="&lt;0..99999g&gt;.&lt;00..99&gt;" />
                                <ValidationSettings>
                                    <RegularExpression ErrorText="" />
                                    <RequiredField ErrorText="Please Fill this field" IsRequired="True" />
                                </ValidationSettings>
                            </dx:ASPxTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style24" colspan="6">
                            <hr class="style12" />
                            <span class="style24">&nbsp;</span></td>
                    </tr>
                </table>
                <table class="style24" width="100%">
                    <tr>
                        <td class="style47">
                            &nbsp;</td>
                        <td class="style47">
                            <span class="style24"><strong>Distributor Price</strong></span></td>
                        <td class="style6">
                            <dx:ASPxTextBox ID="productprice" runat="server" BackColor="#D8E3B6" 
                                ClientIDMode="AutoID" DisplayFormatString="Rs.{0}" Width="150px">
                                <MaskSettings IncludeLiterals="DecimalSymbol" 
                                    Mask="&lt;0..99999g&gt;.&lt;00..99&gt;" />
                                <ValidationSettings>
                                    <RequiredField ErrorText="Please Fill this field" IsRequired="True" />
                                </ValidationSettings>
                            </dx:ASPxTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style47">
                            &nbsp;</td>
                        <td class="style47">
                            <strong>Point Value</strong></td>
                        <td class="style6">
                            <dx:ASPxTextBox ID="pointvalue" runat="server" AutoPostBack="True" 
                                BackColor="#D8E3B6" ClientIDMode="AutoID" 
                                CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                                SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Width="100px">
                                <MaskSettings Mask="&lt;0..99999g&gt;.&lt;000..999&gt;" />
                                <ValidationSettings>
                                    <ErrorFrameStyle ImageSpacing="4px">
                                        <ErrorTextPaddings PaddingLeft="4px" />
                                    </ErrorFrameStyle>
                                    <RequiredField ErrorText="Please Enter Point Value to this Product" 
                                        IsRequired="True" />
                                </ValidationSettings>
                            </dx:ASPxTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style47">
                            &nbsp;</td>
                        <td class="style47">
                            <strong>Bussiness Value</strong></td>
                        <td class="style6">
                            <dx:ASPxTextBox ID="businesspoint" runat="server" BackColor="#D8E3B6" 
                                ClientIDMode="AutoID" CssFilePath="~/App_Themes/Aqua/{0}/styles.css" 
                                CssPostfix="Aqua" SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css" 
                                Width="75px">
                                <MaskSettings Mask="&lt;0..99999g&gt;.&lt;000..999&gt;" />
                                <ValidationSettings>
                                    <ErrorFrameStyle ImageSpacing="4px">
                                        <ErrorTextPaddings PaddingLeft="4px" />
                                    </ErrorFrameStyle>
                                </ValidationSettings>
                            </dx:ASPxTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style47">
                            &nbsp;</td>
                        <td class="style47">
                            <strong>Item image</strong></td>
                        <td>
                            <strong>
                            <asp:FileUpload ID="FileUpload1" runat="server" class="multi" Width="200px" />
                            </strong>
                        </td>
                    </tr>
                    <tr>
                        <td class="style47">
                            &nbsp;</td>
                        <td class="style47">
                            <strong>Status</strong></td>
                        <td>
                            <asp:DropDownList ID="DropDownList3" runat="server" Width="150px">
                                <asp:ListItem>Show</asp:ListItem>
                                <asp:ListItem>Hide</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="style46">
                            &nbsp;</td>
                        <td class="style46">
                        </td>
                        <td class="spacer">
                            <asp:Label ID="Label2" runat="server" Text="Label" Visible="False"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style47">
                            &nbsp;</td>
                        <td class="style47">
                            <dx:ASPxButton ID="ASPxButton2" runat="server" ClientIDMode="AutoID" 
                                CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                                OnClick="ASPxButton2_Click" 
                                SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" 
                                Text="Add New Product">
                            </dx:ASPxButton>
                        </td>
                        <td>
                            <strong>
                            <asp:Label ID="Label3" runat="server" CssClass="style24" ForeColor="#CC0000" 
                                Text="Label" Visible="False"></asp:Label>
                            </strong>
                        </td>
                    </tr>
                    <tr>
                        <td class="style47">
                            &nbsp;</td>
                        <td class="style47">
                            &nbsp;</td>
                        <td>
                            <strong>
                            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                                SelectCommand="SELECT [Sub_Cat_Name] FROM [Tbl_Sub_Category] WHERE ([Cat_Name] = @Cat_Name)">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="DropDownList1" Name="Cat_Name" 
                                        PropertyName="SelectedValue" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            </strong>
                            <asp:SqlDataSource ID="SqlDataSource10" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                                SelectCommand="SELECT [Cat_Name], [Cat_ID] FROM [Tbl_Category]"></asp:SqlDataSource>
                        </td>
                    </tr>
                </table>
            </dx:PanelContent>
        </PanelCollection>
        <Border BorderColor="#999999" BorderStyle="Solid" />
    </dx:ASPxPanel>
                                        </dx:PopupControlContentControl>
</ContentCollection>
                                </dx:ASPxPopupControl>
                            </td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
     
        
    <br />
     

    <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
        ClientIDMode="AutoID" DataSourceID="SqlDataSource1" KeyFieldName="Pro_ID;Code" Width="100%" 
        onrowupdating="ASPxGridView1_RowUpdating" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
        CssPostfix="BlackGlass" onrowvalidating="ASPxGridView1_RowValidating" 
            oncustomunboundcolumndata="ASPxGridView1_CustomUnboundColumnData" >
        
        <%--Start of columns--%>
        <Columns>
           <dx:GridViewCommandColumn VisibleIndex="0" FixedStyle="Left" CellStyle-BackColor="#ffffd6" Width="25">
                <EditButton Visible="True">
                </EditButton>
                <ClearFilterButton Visible="True">
                </ClearFilterButton>
                <HeaderStyle Font-Bold="True" ForeColor="Black" />
                <CellStyle BackColor="#DEE1E7" Font-Bold="True" ForeColor="Black"></CellStyle>
           </dx:GridViewCommandColumn>

           

           <dx:GridViewDataComboBoxColumn Caption="Category " FieldName="Cat_Name" 
                VisibleIndex="2" Width="100px">
                <PropertiesComboBox TextField="Cat_Name" ValueField="Cat_Name" EnableSynchronization="True"
                    IncrementalFilteringMode="StartsWith" DataSourceID="SqlDataSource7" >
                </PropertiesComboBox>
           </dx:GridViewDataComboBoxColumn>

            <dx:GridViewDataComboBoxColumn Caption="Sub Category " FieldName="Sub_Cat_Name" 
                VisibleIndex="3" Width="100px">
                 <PropertiesComboBox TextField="Sub_Cat_Name" ValueField="Sub_Cat_Name" EnableSynchronization="False"
                    IncrementalFilteringMode="StartsWith" DataSourceID="SqlDataSource8">
                 </PropertiesComboBox>
            </dx:GridViewDataComboBoxColumn>

            <dx:GridViewDataTextColumn FieldName="Pro_ID"  VisibleIndex="4" Width="100px"
                Caption="Item Code" ShowInCustomizationForm="True">
            </dx:GridViewDataTextColumn>

            <dx:GridViewDataComboBoxColumn Caption="Product Code" FieldName="Code" 
                 VisibleIndex="5" Width="100px">
                <PropertiesComboBox ValueType="System.String" EnableSynchronization="False" IncrementalFilteringMode="StartsWith" >
                    <Items>
                        <dx:ListEditItem Text="1" Value="1"  />
                        <dx:ListEditItem Text="2" Value="2" />
                        <dx:ListEditItem Text="3" Value="3" />
                        <dx:ListEditItem Text="4" Value="4" />
                        <dx:ListEditItem Text="5" Value="5" />
                        <dx:ListEditItem Text="6" Value="6" />
                        <dx:ListEditItem Text="7" Value="7" />
                        <dx:ListEditItem Text="8" Value="8" />
                        <dx:ListEditItem Text="9" Value="9" />
                        <dx:ListEditItem Text="10" Value="10" />
                        <dx:ListEditItem Text="11" Value="11" />
                        <dx:ListEditItem Text="12" Value="12" />
                        <dx:ListEditItem Text="13" Value="13" />
                        <dx:ListEditItem Text="14" Value="14" />
                        <dx:ListEditItem Text="15" Value="15" />
                        <dx:ListEditItem Text="16" Value="16" />
                        <dx:ListEditItem Text="17" Value="17" />
                        <dx:ListEditItem Text="18" Value="18" />
                        <dx:ListEditItem Text="19" Value="19" />
                        <dx:ListEditItem Text="20" Value="20" />
                        <dx:ListEditItem Text="21" Value="21" />
                        <dx:ListEditItem Text="22" Value="22" />
                        <dx:ListEditItem Text="23" Value="23" />
                        <dx:ListEditItem Text="24" Value="24" />
                        <dx:ListEditItem Text="25" Value="25" />
                        <dx:ListEditItem Text="26" Value="26" />
                        <dx:ListEditItem Text="27" Value="27" />
                        <dx:ListEditItem Text="28" Value="28" />
                        <dx:ListEditItem Text="29" Value="29" />
                        <dx:ListEditItem Text="30" Value="30" />
                        <dx:ListEditItem Text="31" Value="31" />
                        <dx:ListEditItem Text="32" Value="32" />
                        <dx:ListEditItem Text="33" Value="33" />
                        <dx:ListEditItem Text="34" Value="34" />
                        <dx:ListEditItem Text="35" Value="35" />
                        <dx:ListEditItem Text="36" Value="36" />
                        <dx:ListEditItem Text="37" Value="37" />
                        <dx:ListEditItem Text="38" Value="38" />
                        <dx:ListEditItem Text="39" Value="39" />
                        <dx:ListEditItem Text="40" Value="40" />
                        <dx:ListEditItem Text="41" Value="41" />
                        <dx:ListEditItem Text="42" Value="42" />
                        <dx:ListEditItem Text="43" Value="43" />
                        <dx:ListEditItem Text="44" Value="44" />
                        <dx:ListEditItem Text="45" Value="45" />
                        <dx:ListEditItem Text="46" Value="46" />
                        <dx:ListEditItem Text="47" Value="47" />
                        <dx:ListEditItem Text="48" Value="48" />
                        <dx:ListEditItem Text="49" Value="49" />
                        <dx:ListEditItem Text="50" Value="50" />
                    </Items>
                    <ItemStyle Cursor="auto" />
                </PropertiesComboBox>
            </dx:GridViewDataComboBoxColumn>

            <dx:GridViewDataTextColumn FieldName="Pro_Name" VisibleIndex="6" 
                Caption="Item" Width="100px" ShowInCustomizationForm="True">
            </dx:GridViewDataTextColumn>

            <dx:GridViewDataTextColumn FieldName="Description" VisibleIndex="6" 
                Caption="Description" Width="100px" ShowInCustomizationForm="True">
            </dx:GridViewDataTextColumn>

           
            <dx:GridViewDataComboBoxColumn Caption="Item Brand" FieldName="Brand_Name" 
                VisibleIndex="8">
                <PropertiesComboBox TextField="Brand_Name" ValueField="Brand_Name" EnableSynchronization="True"
                    IncrementalFilteringMode="StartsWith" DataSourceID="SqlDataSource9">
                </PropertiesComboBox>
            </dx:GridViewDataComboBoxColumn>

            <dx:GridViewDataTextColumn FieldName="Pur_Price" VisibleIndex="9" 
                Caption="Cost" Width="100px" ShowInCustomizationForm="True">
                <PropertiesTextEdit DisplayFormatString="Rs.{0}">
                    <MaskSettings IncludeLiterals="DecimalSymbol" 
                        Mask="&lt;0..99999g&gt;.&lt;00..99&gt;" />
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>

            <dx:GridViewDataTextColumn FieldName="Ret_Price" VisibleIndex="10"
                Caption="Marked Price" Width="100px" ShowInCustomizationForm="True" >
                <PropertiesTextEdit DisplayFormatString="Rs.{0}" >
                    <MaskSettings IncludeLiterals="DecimalSymbol" 
                        Mask="&lt;0..99999g&gt;.&lt;00..99&gt;" />
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>

            <dx:GridViewDataTextColumn Caption="Distributor Price" FieldName="Pro_Price" 
                UnboundType="Decimal" VisibleIndex="11" Width="100px">
                <PropertiesTextEdit DisplayFormatString="Rs.{0}">
                    <ValidationSettings>
                        <RegularExpression ErrorText="" />
                        <RequiredField ErrorText="" />
                    </ValidationSettings>
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Point Value" FieldName="Point_Value" 
                UnboundType="Decimal" VisibleIndex="12">
                <PropertiesTextEdit DisplayFormatString="g">
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Business Value" FieldName="Business_Value" 
                UnboundType="Decimal" VisibleIndex="13" Width="100px">
                <PropertiesTextEdit DisplayFormatString="g">
                </PropertiesTextEdit>
                <EditCellStyle BackColor="#FAE4A3" ForeColor="#FEE7A5">
                </EditCellStyle>
                <EditFormCaptionStyle BackColor="#F0DA9C">
                </EditFormCaptionStyle>
            </dx:GridViewDataTextColumn>

           
            <dx:GridViewDataTextColumn Caption="Product image" FieldName="Pro_Image" 
                VisibleIndex="15">

            </dx:GridViewDataTextColumn>

            <dx:GridViewDataTextColumn Caption="Product image" FieldName="Pro_Image2" 
                 ShowInCustomizationForm="True" VisibleIndex="16">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Product image" FieldName="Pro_Image3" 
                 ShowInCustomizationForm="True" VisibleIndex="17">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Product image" FieldName="Pro_Image4" 
                 ShowInCustomizationForm="True" VisibleIndex="18">
            </dx:GridViewDataTextColumn>
           
            <dx:GridViewDataComboBoxColumn Caption="Status" FieldName="Status" 
                VisibleIndex="14">
                <PropertiesComboBox ValueType="System.String">
                    <Items>
                        <dx:ListEditItem Text="Show" Value="Show" />
                        <dx:ListEditItem Text="Hide" Value="Hide" />
                    </Items>
                </PropertiesComboBox>
            </dx:GridViewDataComboBoxColumn>
           
 </Columns>
        <%--End of columns--%>

        <SettingsBehavior ConfirmDelete="True" />
        <SettingsPager PageSize="15">
        </SettingsPager>
        <Settings ShowHorizontalScrollBar="True" ShowFilterRow="True" />
        <Images SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/BlackGlass/GridView/gvLoadingOnStatusBar.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/BlackGlass/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
            CssPostfix="BlackGlass">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
        </Styles>
        <StylesEditors>
            <CalendarHeader Spacing="1px">
            </CalendarHeader>
            <ProgressBar Height="25px">
            </ProgressBar>
        </StylesEditors>

  </dx:ASPxGridView>
       
  <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
        SelectCommand="SELECT Pro_ID, Code, Description, Pro_Name, Pro_Price, Ret_Price, Pur_Price, Point_Value,Pro_Image, Pro_Image2, Pro_Image3, Pro_Image4, Cat_Name, Sub_Cat_Name, Business_Value, Brand_Name, Status FROM Tbl_Product" 
        InsertCommand="INSERT INTO [Tbl_Product] ([Pro_ID], [Code], [Description], [Pro_Name], [Pro_Price], [Ret_Price], [Pur_Price], [Point_Value],[Pro_Image], [Pro_Image2], [Pro_Image3], [Pro_Image4], [Cat_Name], [Sub_Cat_Name], [Business_Value], [Brand_Name]) VALUES (@Pro_ID, @Code, @Description, @Pro_Name, @Pro_Price, @Ret_Price, @Pur_Price, @Point_Value,@Pro_Image, @Pro_Image2, @Pro_Image3, @Pro_Image4, @Cat_Name, @Sub_Cat_Name, @Percentage, @Business_Value, @Brand_Name)" 
        DeleteCommand="DELETE FROM [Tbl_Product] WHERE [Pro_ID] = @Pro_ID AND [Code] = @Code" 
        UpdateCommand="UPDATE [Tbl_Product] SET [Description] = @Description, [Pro_Name] = @Pro_Name, [Pro_Price] = @Pro_Price, [Ret_Price] = @Ret_Price, [Pur_Price] = @Pur_Price, [Point_Value] = @Point_Value,[Pro_Image] = @Pro_Image, [Pro_Image2] = @Pro_Image2, [Pro_Image3] = @Pro_Image3, [Pro_Image4] = @Pro_Image4, [Cat_Name] = @Cat_Name, [Sub_Cat_Name] = @Sub_Cat_Name,  [Business_Value] = @Business_Value, [Brand_Name] = @Brand_Name WHERE [Pro_ID] = @Pro_ID AND [Code] = @Code"
        >
        <DeleteParameters>
            
             <asp:Parameter Name="Pro_ID" Type="String" />
             <asp:Parameter Name="Code" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Pro_ID" Type="String" />
             <asp:Parameter Name="Code" Type="String" />
              <asp:Parameter Name="Description" Type="String" />
               <asp:Parameter Name="Pro_Name" Type="String" />
                <asp:Parameter Name="Pro_Price" Type="Decimal" />
                 <asp:Parameter Name="Ret_Price" Type="Decimal" />
                  <asp:Parameter Name="Pur_Price" Type="Decimal" />
                   <asp:Parameter Name="Point_Value" Type="Decimal" />
                   
                     <asp:Parameter Name="Pro_Image" Type="String" />
                      <asp:Parameter Name="Pro_Image2" Type="String" />
                       <asp:Parameter Name="Pro_Image3" Type="String" />
                        <asp:Parameter Name="Pro_Image4" Type="String" />
                         <asp:Parameter Name="Cat_Name" Type="String" />
                         <asp:Parameter Name="Sub_Cat_Name" Type="String" />

            <asp:Parameter Name="Percentage" Type="String" />
            <asp:Parameter Name="Business_Value" Type="Decimal" />

            <asp:Parameter Name="Brand_Name" Type="String" />

        </InsertParameters>

        <UpdateParameters>
            <asp:Parameter Name="Description" Type="String" />
             <asp:Parameter Name="Pro_Name" Type="String" />
              <asp:Parameter Name="Pro_Price" Type="Decimal" />
               <asp:Parameter Name="Ret_Price" Type="Decimal" />
                <asp:Parameter Name="Pur_Price" Type="Decimal" />
                 <asp:Parameter Name="Point_Value" Type="Decimal" />
                  
                   <asp:Parameter Name="Pro_Image" Type="String" />
                    <asp:Parameter Name="Pro_Image2" Type="String" />
                     <asp:Parameter Name="Pro_Image3" Type="String" />
                      <asp:Parameter Name="Pro_Image4" Type="String" />
                       <asp:Parameter Name="Cat_Name" Type="String" />
                        <asp:Parameter Name="Sub_Cat_Name" Type="String" />
                         <asp:Parameter Name="Percentage" Type="String" />
                         <asp:Parameter Name="Business_Value" Type="Decimal" />
            <asp:Parameter Name="Brand_Name" Type="String" />
            <asp:Parameter Name="Pro_ID" Type="String" />
            <asp:Parameter Name="Code" Type="String" />
        </UpdateParameters>

    </asp:SqlDataSource>

        <asp:SqlDataSource ID="SqlDataSource7" runat="server" 
            ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
            SelectCommand="SELECT [Cat_Name] FROM [Tbl_Category]"></asp:SqlDataSource>

        <asp:SqlDataSource ID="SqlDataSource8" runat="server" 
            ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
            SelectCommand="SELECT [Sub_Cat_Name] FROM [Tbl_Sub_Category]">
        </asp:SqlDataSource>
    <asp:SqlDataSource runat="server" 
            ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
            SelectCommand="SELECT [Cat_Name] FROM [Tbl_Category]" 
            ID="SqlDataSource5"></asp:SqlDataSource>

       <asp:SqlDataSource ID="SqlDataSource9" runat="server" 
            ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
            SelectCommand="SELECT DISTINCT [Brand_Name] FROM [Tbl_Product]">
        </asp:SqlDataSource>  

                        
    </asp:Content>
 <%--End of content--%>


